package com.bs.bszhsq.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 社区信息评论表
 * </p>
 *
 * @author 章宇光
 * @since 2024-04-23
 */
@ApiModel(value = "Discusss对象", description = "社区信息评论表")
public class Discusss implements Serializable {

    private static final long serialVersionUID = 1L;

      @ApiModelProperty("主键")
        @TableId(value = "id", type = IdType.AUTO)
      private Long id;

      @ApiModelProperty("创建时间")
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      private LocalDateTime addtime;

      @ApiModelProperty("用户id")
      private Long userid;

      @ApiModelProperty("评论内容")
      private String content;

      @ApiModelProperty("顶级id")
      private Long orginId;

      @ApiModelProperty("文章id")
      private Long forumId;

      @ApiModelProperty("父id")
      private Long pid;

      @TableField(exist = false)
      private String username;

    @TableField(exist = false)
    private List<Discusss> children;

    @TableField(exist = false)
    private String pusername;

    
    public Long getId() {
        return id;
    }

      public void setId(Long id) {
          this.id = id;
      }
    
    public LocalDateTime getAddtime() {
        return addtime;
    }

      public void setAddtime(LocalDateTime addtime) {
          this.addtime = addtime;
      }
    
    public Long getUserid() {
        return userid;
    }

      public void setUserid(Long userid) {
          this.userid = userid;
      }
    
    public String getContent() {
        return content;
    }

      public void setContent(String content) {
          this.content = content;
      }

    public Long getOrginId() {
        return orginId;
    }

    public void setOrginId(Long orginId) {
        this.orginId = orginId;
    }

    public Long getForumId() {
        return forumId;
    }

    public void setForumId(Long forumId) {
        this.forumId = forumId;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public List<Discusss> getChildren() {
        return children;
    }

    public void setChildren(List<Discusss> children) {
        this.children = children;
    }

    public String getPusername() {
        return pusername;
    }

    public void setPusername(String pusername) {
        this.pusername = pusername;
    }

    @Override
    public String toString() {
        return "Discusss{" +
              "id = " + id +
                  ", addtime = " + addtime +
                  ", userid = " + userid +
                  ", content = " + content +
                  ", orginId = " + orginId +
                  ", forumId = " + forumId +
                  ", pid = " + pid +
              "}";
    }
}
